package com.project.model;

import com.baomidou.mybatisplus.annotation.*;
import com.project.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("user")
public class User extends BaseEntity {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String username;
    private String password;
    private String nickname;
    private String avatar;
    private String phone;
    private String email;
    private Integer gender; // 0-未知 1-男 2-女
    private String birthday;
    private String address;
    private String emergencyContact; // 紧急联系人
    private String emergencyPhone; // 紧急联系电话
    private String medicalHistory; // 既往病史
    private String allergies; // 过敏史
    private Integer status; // 0-禁用 1-正常
    private String role; // ADMIN, DOCTOR, USER
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    @TableLogic
    private Integer deleted;
} 